from django.conf.urls import url
from . import views

urlpatterns = [
    #1,获取热销商品
    url(r'^categories/(?P<category_id>\d+)/hotskus/$',views.HotSkuListView.as_view()),

    #2,获取商品列表
    url(r'^categories/(?P<category_id>\d+)/skus/$',views.SkuListView.as_view())
]


from rest_framework.routers import DefaultRouter
router = DefaultRouter()
router.register('search', views.SKUSearchViewSet, base_name='skus_search')

urlpatterns += router.urls